package com.example.back.service.impl;

import com.example.back.mapper.AccommodationMapper;
import com.example.back.model.Accommodation;
import com.example.back.model.Route;
import com.example.back.service.RouteService;
import com.example.back.mapper.RouteMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author jialily
* @description 针对表【t_route】的数据库操作Service实现
* @createDate 2022-05-02 14:06:28
*/
@Service("routeService")
//支持事务，增加，删除，更新操作单独使用 propagation = Propagation.SUPPORTS
@Transactional(propagation = Propagation.SUPPORTS,rollbackFor = Exception.class)
public class RouteServiceImpl implements RouteService{

    @Autowired
    RouteMapper routeMapper;

    public List<Route> selectAll() {
        return this.routeMapper.selectAll();
    }

    @Override
    public Route selectDetail(String itemId) {
        return this.routeMapper.selectDetail(itemId);
    }

}
